<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.tietiao.com/functions" prefix="my"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script type="text/javascript" src="./js/fg/common/utils.js"></script>
<script>
$(function() {
	$('#moreId').mouseenter(function(){
		$('.more-list').show();
		$('.more-list').mouseleave(function(){
			$(this).hide();
		});
	});
});
</script>
<div id="content">
	<div class="wrapper-content">
		<div class="teaser alt">
			<div class="catalog-list">组名：<a href="#" onclick="loadMeAttention('0','-1',this);return false;">全部</a>
				<c:forEach items="${groups}" var="group">
					<c:if test="${groupId==group.groupId}">${group.groupName}</c:if>
					<c:if test="${groupId!=group.groupId}">
						<a href="#" onclick="loadMeAttention('0','${group.groupId}',this);return false;">${group.groupName}</a>
					</c:if>
				</c:forEach>
			</div>
		</div>
		<div class="inside-content">
			<div class="followers-listing">
				<ol>
				<c:choose>
					<c:when test="${empty friends}">
						<li><span class="given-name">${userId==user.userId? '':'Ta'}暂无关注好友 </span></li>
					</c:when>
					<c:otherwise>
						<c:forEach var="friend" items="${friends}">
							<c:set value="${my:eachOtherAtten(friend.userId,midUserAttention)}" var="attenType"/>
							<li class="vcard">
								<a href="friend_friends_home.htm?userId=${friend.userId}" class="url">
									<img src="${photoPath}${friend.userPhoto}" class="photo"/>
									<strong class="nickname">${friend.petName}</strong>
									<span class="fn n">
										<span class="given-name">${friend.relName}</span>
									</span>
								</a>
								<div class="tie-stuff-list">
									<c:choose>
										<c:when test="${attenType==1}">
											<span class="myself">本人</span>
										</c:when>
										<c:when test="${attenType==4}">
											<a class="followed" href="#">互相贴条</a>
											<a href="javascript:cancelFriend('${friend.userId}',this)" class="followeo" id="user_${friend.userId}">撕条</a>
										</c:when>
										<c:when test="${attenType==2}">
											<a class="followed" href="#">已贴条</a>
											<a href="javascript:cancelFriend('${friend.userId}',this)" class="followeo" id="user_${friend.userId}">撕条</a>
										</c:when>
										<c:otherwise>
												<a class="followed" href="javascript:showGroup('${friend.userId}',this)" id="user_${friend.userId}">贴条</a>
										</c:otherwise>
									</c:choose>
								</div>
								<div class="tie-stuff-date">
									<c:if test="${not empty friend.createTime}">
										<span>关注时间:<fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${friend.createTime}"/></span>
									</c:if>
								</div>	
							</li>
						</c:forEach>
					</c:otherwise>
				</c:choose>
				</ol>
			</div>
		</div>
	</div>
</div>
<c:if test="${meAttenFried>defaultNum}">
	<div class="pagination"> <a style="" href="#" class="btn-more" ><span>显示更多...</span></a> </div>
</c:if>
